"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
async function resizeImage(imageBuffer, width = 200, height = 200) {
    const { createCanvas, loadImage } = require('@napi-rs/canvas');
    const image = await loadImage(imageBuffer);
    const canvas = createCanvas(width, height);
    const ctx = canvas.getContext('2d');
    ctx.drawImage(image, 0, 0, width, height);
    return await canvas.encode('jpeg');
}
exports.default = resizeImage;
